package com.hqd.ch03.v50.boot.web.server;

import java.security.KeyStore;

public interface SslStoreProvider {

    /**
     * Return the key store that should be used.
     *
     * @return the key store to use
     * @throws Exception on load error
     */
    KeyStore getKeyStore() throws Exception;

    /**
     * Return the trust store that should be used.
     *
     * @return the trust store to use
     * @throws Exception on load error
     */
    KeyStore getTrustStore() throws Exception;

    /**
     * Return the password of the private key in the key store.
     *
     * @return the key password
     * @since 2.7.2
     */
    default String getKeyPassword() {
        return null;
    }

}
